<?php
namespace app\api\model;
class RoomModel extends BaseModel
{
    public function getRoomList($cate_id)
    {
        return $list = db('room')
            ->alias('r')
            ->join('room_cate c', 'r.two_cate = c.id')
            ->where(['r.one_cate' => $cate_id, 'c.status' => 0, 'r.status' => 0,'r.is_activity' => 0 ])
            ->field(['r.id'=>'id','c.title' => 'title', 'r.logo' => 'image', 'r.bed' => 'bed', 'r.old_price' => 'old_price','r.new_price'=>'new_price','r.area'=>'area','r.floor'=>'floor','r.description'=>'description','is_coupon'=>'is_coupon','is_recharge'=>'is_recharge','is_second'=>'is_second','r.order_num'=>'order_num','r.description'=>'description','r.images'=>'banner','r.room_num'=>'room_num'])
            ->select();
    }
}